package com.zhouheng.springbootconverter.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 测试反序列化
 *
 * @author 周恒
 * @date 20191210 16:21:15
 * @since v1.0
 */
@Data
public class ConverterDto {

    public ConverterDto(LocalDateTime observeTime) {
        this.observeTime = observeTime;
    }

    public ConverterDto(Date date) {
        this.date = date;
    }

    @JsonFormat(pattern = "yyyy年MM月dd日")
    private LocalDateTime observeTime;

    @JsonFormat(pattern = "yyyy年MM月dd日")
    private Date date;

}
